home *** CD-ROM | disk | FTP | other *** search
- Path: hubcap.clemson.edu!hubcap!mjs
- From: mjs@hubcap.clemson.edu (M. J. Saltzman)
- Newsgroups: comp.lang.c,sci.math.num-analysis
- Subject: Re: C library on computation of matrix determinants
- Followup-To: sci.math.num-analysis
- Date: 7 Mar 96 01:43:49 GMT
- Organization: Clemson University
- Distribution: inet
- Message-ID: <mjs.826163029@hubcap>
- References: <wiedem01.4.000E6903@fsuni.rz.uni-passau.de> <4hl5jiINNbom@anvil.ugrad.cs.ubc.ca>
- NNTP-Posting-Host: hubcap.clemson.edu
- X-Newsreader: NN version 6.5.0 #1
-
- In comp.lang.c, c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku) writes:
-
- >In article <wiedem01.4.000E6903@fsuni.rz.uni-passau.de>,
- >WIEDEMANN CHRISTINE <wiedem01@fsuni.rz.uni-passau.de> wrote:
- >>I'm looking for a library containing source codes on how to compute a
- >>determinant of a matrix. Does anybody know where to find such a library,
- >>source codes or algorithms on determinant computation.
-
- >One way to do this is to do Gaussian elimination on the matrix, while applying
- >the same row operations to an identity matrix. Once you isolate the pivots, the
- >determinant is just a product of the diagonal elements. As a bonus, if you
- >carry through the operations, you get the matrix inverse.
-
- Getting the inverse is of dubious value. For most applications, you
- would rather have the LU-factorization (which you get by performing
- Gaussian elimination and remembering the inverses of the pivots you
- perform). The inverse costs more and provides less accuracy than the
- factorization.
-
- Also, as I pointed out to Christine via e-mail, the determinant is
- useless for deciding if a matrix is singular or not. For that, you
- want the condition number.
-
- >The naive method of computing the determinant by recursive expansion of
- >cofactors/minors yields exponential complexity, whereas Gaussian runs in cubic
- >time in the rank of the matrix.
-
- >[...]
-
- >I wrote a C module a few years ago that does these kinds of things, but it is
- >in archival storage, unfortunately!
-
- Good linear algebra libraries can be found at Netlib (www.netlib.org)
- or GAMS (gams.nist.gov), or in the list of numerical C/C++ codes
- posted to comp.lang.c and other groups by Ajay Shah.
-
- >[Discussion of partial pivoting deleted]
-
- >There is probably a better newsgroup to ask this question; perhaps something
- >related to numerical analysis.
-
- That would be sci.math.num-analysis. I've directed followups there.
-
- --
- Matthew Saltzman
- Clemson University Math Sciences
- mjs@clemson.edu
-